export default {
  handleBeforeUpload (file) {
    const img = file.name.substring(file.name.lastIndexOf('.') + 1)
    const suffix = img === 'jpg'
    const suffix2 = img === 'png'
    const suffix3 = img === 'jpeg'
    if (!suffix && !suffix2) {
      this.$message.error('只能上传图片文件!')
      return false
    }
    return suffix || suffix2 || suffix3
  }
}
